//RobDeviceInterface.h

//gsoap ns1 service name:	RobDeviceInterface
//gsoap ns1 service style:	rpc
//gsoap ns1 service encoding:	encoded
//gsoap ns1 service namespace:	urn:RobDeviceInterface
//gsoap ns1 service location:	http://localhost:8080/RobDeviceInterface/

enum xsd__boolean {false_, true_};

//gsoap ns1 service method-documentation: empty struct used for no return argument method
struct ns1__EmptyStruct{};

//gsoap ns1 service method-documentation: image binary array
struct DoubleArray
{
	double * __ptr;
	int __size;
	int __offset;
};



/*  Image format 1: 8-bit monochrome. 
	Image format 2: 16-bit monochrome (network byte order). 
	Image format 4: 16-bit color (5 bits R, 6 bits G, 5 bits B). 
	Image format 5: 24-bit color (8 bits R, 8 bits G, 8 bits B). 
	#define ROBDEVICE_CAMERA_FORMAT_MONO8  1
	#define ROBDEVICE_CAMERA_FORMAT_MONO16 2
	#define ROBDEVICE_CAMERA_FORMAT_RGB565 4
	#define ROBDEVICE_CAMERA_FORMAT_RGB888 5
*/

/*  Compression method 0: raw 
	Compression method 1: jpeg 
	#define ROBDEVICE_CAMERA_COMPRESS_RAW  0
	#define ROBDEVICE_CAMERA_COMPRESS_JPEG 1
*/
/** Image data binary. */
struct ByteBinary
{
	unsigned char * __ptr;
	int __size;
	int __offset;
};

//gsoap ns1 service method-documentation: camera image struct
#define ROBDEVICE_CAMERA_FORMAT_MONO8  1
#define ROBDEVICE_CAMERA_FORMAT_MONO16 2
#define ROBDEVICE_CAMERA_FORMAT_RGB565 4
#define ROBDEVICE_CAMERA_FORMAT_RGB888 5
#define ROBDEVICE_CAMERA_COMPRESS_RAW  0
#define ROBDEVICE_CAMERA_COMPRESS_JPEG 1
struct ns1_CameraImage
{
	/* Time stamp of getting this image. */
	time_t TimeStamp;
	/* Image dimensions [pixels]. */
	unsigned int Width;
	/* Image dimensions [pixels]. */
	unsigned int Height;
	/*  
	Image format 1: 8-bit monochrome. 
	Image format 2: 16-bit monochrome (network byte order). 
	Image format 4: 16-bit color (5 bits R, 6 bits G, 5 bits B). 
	Image format 5: 24-bit color (8 bits R, 8 bits G, 8 bits B). 
	#define ROBDEVICE_CAMERA_FORMAT_MONO8  1
	#define ROBDEVICE_CAMERA_FORMAT_MONO16 2
	#define ROBDEVICE_CAMERA_FORMAT_RGB565 4
	#define ROBDEVICE_CAMERA_FORMAT_RGB888 5
	*/
	unsigned int Format;
	/*  
	Compression method 0: raw 
	Compression method 1: jpeg 
	#define ROBDEVICE_CAMERA_COMPRESS_RAW  0
	#define ROBDEVICE_CAMERA_COMPRESS_JPEG 1
	*/
	unsigned int Compression;
	/* Compressed image data (byte-aligned, row major order). Multi-byte image formats (such as MONO16) must be converted to network byte ordering. */
	struct ByteBinary ImageData;
};


//gsoap ns1 service method-documentation: get device's common information
int ns1__Device_GetHardwareID( int deviceType, int deviceIndex, int *retHardwareID);

int ns1__Device_GetName( int deviceType, int deviceIndex, char **retName);

int ns1__Device_GetPose( int deviceType, int deviceIndex, struct ns1__Device_GetPoseResponse{double Data[7];} *retPose);



//gsoap ns1 service method-documentation: DeviceDictionary
int ns1__DeviceDictionary_GetDeviceNumber( int deviceIndex, int *retDeviceNumber);

int ns1__DeviceDictionary_GetNextDevice( int deviceIndex,  int currentDeviceType,  int currentDeviceIndex, struct ns1__DeviceDictionary_GetNextDeviceResponse{int Data[2];} *retNextDevice);



//gsoap ns1 service method-documentation: Stream



//gsoap ns1 service method-documentation: AnalogSensor
int ns1__AnalogSensor_GetNormalizedMeasurement( int deviceIndex, double *retValue);

int ns1__AnalogSensor_GetRawMeasurement( int deviceIndex, double *retValue);

int ns1__AnalogSensor_GetRawMeasurementRange( int deviceIndex, double *retValue);

int ns1__AnalogSensor_GetLastTimeStamp( int deviceIndex, time_t *retValue);



//gsoap ns1 service method-documentation: ContactSensor
int ns1__ContactSensor_IsPressed( int deviceIndex, enum xsd__boolean *retIsPressed);

int ns1__ContactSensor_GetLastTimeStamp( int deviceIndex, time_t *retValue);



//gsoap ns1 service method-documentation: Battery
int ns1__Battery_GetMaxBatteryPower( int deviceIndex, double *retMaxPower);

int ns1__Battery_GetPercentBatteryPower( int deviceIndex, double *retPercentPower);

int ns1__Battery_GetPercentCriticalBattery( int deviceIndex, double *retPercentPower);

int ns1__Battery_SetPercentCriticalBattery( int deviceIndex, double critcalPercent, struct ns1__EmptyStruct *retEmpty);



//gsoap ns1 service method-documentation: Motor
int ns1__Motor_GetCurrentMotorPower( int deviceIndex, double *retPower);

int ns1__Motor_GetCurrentMotorPos( int deviceIndex, double *retPose);

int ns1__Motor_GetCurrentMotorSpeed( int deviceIndex, double *retSpeed);

int ns1__Motor_GetGearRatio( int deviceIndex, double *retGearRatio);

int ns1__Motor_GetWheelRadius( int deviceIndex, double *retWheelRadius);

int ns1__Motor_SetTargetMotorPower( int deviceIndex,  double power, struct ns1__EmptyStruct *retEmpty);

int ns1__Motor_SetTargetMotorPos( int deviceIndex,  double pose, struct ns1__EmptyStruct *retEmpty);

int ns1__Motor_SetTargetMotorSpeed( int deviceIndex,  double speed, struct ns1__EmptyStruct *retEmpty);

int ns1__Motor_SetTarget( int deviceIndex,  double pose,  double speed,  double refPower, struct ns1__EmptyStruct *retEmpty);

int ns1__Motor_Stop( int deviceIndex, struct ns1__EmptyStruct *retEmpty);



//gsoap ns1 service method-documentation: Encoder
int ns1__Encoder_GetCurrentAngle( int deviceIndex, double *retAngle);

int ns1__Encoder_GetCurrentReading( int deviceIndex, int *retReading);

int ns1__Encoder_GetTicksPerRevolution( int deviceIndex, int *retTicksPerRev);

int ns1__Encoder_GetTicksSinceReset( int deviceIndex, int *retTicksSinceReset);

int ns1__Encoder_ResetTickCounter( int deviceIndex, struct ns1__EmptyStruct *retEmpty);

int ns1__Encoder_GetLastTimeStamp( int deviceIndex, time_t *retValue);



//gsoap ns1 service method-documentation: Sonar
int ns1__Sonar_GetAngularRange( int deviceIndex, double *retAnglarRange);

int ns1__Sonar_GetAngularResolution( int deviceIndex, double *retAnglarResolution);

int ns1__Sonar_GetMaxDistance( int deviceIndex, double *retMaxDistance);

int ns1__Sonar_GetDistanceMeasurement( int deviceIndex, double *retDistance);

int ns1__Sonar_GetLastTimeStamp( int deviceIndex, time_t *retValue);



//gsoap ns1 service method-documentation: Camera
int ns1__Camera_GetImageSize( int deviceIndex, struct ns1__Camera_GetImageSizeResponse{int Data[2];} *retImageSize);

int ns1__Camera_GetViewAngle( int deviceIndex, double *retViewAngle);

int ns1__Camera_GetQuality( int deviceIndex, double *retQuality);

int ns1__Camera_GetLastFrame( int deviceIndex, struct ns1__Camera_GetLastFrameResponse{struct ns1_CameraImage Data;} *retLastFrame);

int ns1__Camera_GetLastTimeStamp( int deviceIndex, time_t *retValue);



//gsoap ns1 service method-documentation: SickLRF



//gsoap ns1 service method-documentation: Arm
int ns1__Arm_GetCurrentJointPose( int deviceIndex, struct DoubleArray *retCurrentJointPose);

int ns1__Arm_GetCurrentJointVel( int deviceIndex, struct DoubleArray *retCurrentJointVel);

int ns1__Arm_MoveJoint( int deviceIndex, struct DoubleArray toJointValues, double speed, double flyByZone, struct ns1__EmptyStruct *retEmpty);

int ns1__Arm_Stop( int deviceIndex,  enum xsd__boolean followPath, struct ns1__EmptyStruct *retEmpty);



//gsoap ns1 service method-documentation: DifferentialDrive
int ns1__DifferentialDrive_GetCurrentMoveSpeed( int deviceIndex, double *retMoveSpeed);

int ns1__DifferentialDrive_GetCurrentTurnSpeed( int deviceIndex, double *retTurnSpeed);

int ns1__DifferentialDrive_SetMoveSpeed( int deviceIndex,  double moveSpeed, struct ns1__EmptyStruct *retEmpty);

int ns1__DifferentialDrive_SetTurnSpeed( int deviceIndex,  double turnSpeed, struct ns1__EmptyStruct *retEmpty);

int ns1__DifferentialDrive_Stop( int deviceIndex,struct ns1__EmptyStruct *retEmpty);